$mat-divider-width: 1px;
$mat-divider-inset-margin: 80px;

// This mixin provides the correct offset for an inset divider based on the
// size of the parent class (e.g. avatar vs icon)
@mixin mat-inset-divider-offset($offset, $padding) {
  $mat-inset-divider-offset: #{(2 * $padding) + $offset};
  margin-left: $mat-inset-divider-offset;
  width: calc(100% - #{$mat-inset-divider-offset});

  [dir='rtl'] & {
    margin-left: auto;
    margin-right: $mat-inset-divider-offset;
  }
}

.mat-divider {
  display: block;
  margin: 0;
  border-top-width: $mat-divider-width;
  border-top-style: solid;

  &.mat-divider-vertical {
    border-top: 0;
    border-right-width: $mat-divider-width;
    border-right-style: solid;
  }

  &.mat-divider-inset {
    margin-left: $mat-divider-inset-margin;
    [dir='rtl'] & {
      margin-left: auto;
      margin-right: $mat-divider-inset-margin;
    }
  }
}
